int eval_tree(); /* use the one in agrep/asplit.c */
/* MUST CHANGE ALL memgreps TO USE EXEC DIRECTLY IF POSSIBLE (LAST PRIORITY) */
/* All borrowed from main.c and are needed for searching the index */
extern CHAR *pat_list[MAXNUM_PAT]; /* complete words within global pattern */
extern int pat_lens[MAXNUM_PAT]; /* their lengths */
extern int pat_attr[MAXNUM_PAT]; /* set of attributes */
extern int num_pat;
extern CHAR pat_buf[(MAXNUM_PAT + 2)*MAXPAT];
extern int pat_ptr;
extern int is_mgrep_pat[MAXNUM_PAT];
extern int mgrep_pat_index[MAXNUM_PAT];
extern int num_mgrep_pat;
extern struct offsets **src_offset_table;
extern struct offsets **curr_offset_table;
extern char tempfile[];
extern int patindex;
extern int patbufpos;
extern ParseTree terminals[MAXNUM_PAT];
extern int num_terminals;
extern int INVERSE; /* agrep's global: need here to implement ~ in index-search */
/* [first, last) = C-style range for which we want the words in terminal-values' patterns: 0..num_terminals for !ComplexBoolean, term/term otherwise */
split_terminal(first, last)
int first, last;
{
CHAR *buffer;
CHAR *buffer_new;
CHAR *buffer_end;
CHAR *bp;
CHAR word[MAXNAME];
int word_length;
int type;
int i, j, k, attribute;
char *substring; /* used with strstr(superstring, substring) */